<div class="div-table">
  <!--递归-->
  <div *ngFor="let requestParam of params">
    <!--第1层-->
    <table>
      <tr *ngIf="!edit&&requestParam.show">
        <td [ngStyle]="{'padding-left':(10+20*index)+'px','color':'red'}"><b>{{requestParam.name}}</b></td>
        <td>{{requestParam.dataType}}</td>
        <td>{{requestParam.defaultValue}}</td>
        <td *ngIf="require">{{requestParam.required}}</td>
        <td>{{requestParam.description}}</td>
      </tr>
      <tr *ngIf="edit">
        <td [ngStyle]="{'padding-left':(10+20*index)+'px','color':'red'}"><b>{{requestParam.name}}</b></td>
        <td>{{requestParam.dataType}}</td>
        <td><input style="width: 100%" nz-input [(ngModel)]="requestParam.defaultValue"/></td>
        <td *ngIf="require">
          <nz-select style="width: 100%;" [(ngModel)]="requestParam.required" nzAllowClear nzPlaceHolder="选择">
            <nz-option [nzValue]="true" nzLabel="必填"></nz-option>
            <nz-option [nzValue]="false" nzLabel="非必填"></nz-option>
          </nz-select>
        </td>
        <td>
          <nz-switch [(ngModel)]="requestParam.show" nzCheckedChildren="显示" nzUnCheckedChildren="隐藏"></nz-switch>
        </td>
        <td><input style="width: 100%" nz-input [(ngModel)]="requestParam.description"/></td>
      </tr>
    </table>
    <!--第n层-->
    <div *ngIf="requestParam.list">
      <app-api-param [params]="requestParam.list" [require]="require" [index]="index+1" [edit]="edit"></app-api-param>
    </div>
  </div>
</div>
